package com.cwnu.mapper;

import com.cwnu.entity.FeedBack;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FeedbackMapper {
    @Insert("insert into feedback(feedback_type, content, email, flag) values (#{feedbackType}, #{content}, #{email},1);")
    int add(FeedBack feedBack);

    @Select("select * from feedback where flag = 1")
    List<FeedBack> list();
}
